﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="JsonDbTestWebSite._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2>
            People</h2>
        <ul>
            <% foreach (var person in PersonList)
               { %>
            <li>[<a href="EditPerson.aspx?id=<% = person.ID %>">edit</a> | <a href="default.aspx?type=Person&id=<% = person.ID %>">
                delete</a>]
                <% = person.Name %></li>
            <% } %>
        </ul>
        <p>
            <a href="EditPerson.aspx">Create Person</a>
        </p>
        <h2>
            Units</h2>
        <ul>
            <% foreach (var unit in UnitList)
               { %>
            <li>[<a href="EditUnit.aspx?id=<% = unit.ID %>">edit</a> | <a href="default.aspx?type=Unit&id=<% = unit.ID %>">
                delete</a>]
                <% = unit.Name%></li>
            <% } %>
        </ul>
        <p>
            <a href="EditUnit.aspx">Create Unit</a>
        </p>
        <p>
            <asp:Button ID="CreateBackupButton" runat="server" Text="Create Backup" 
                onclick="CreateBackupButton_Click" />
        </p>
    </div>
    </form>
</body>
</html>
